From: Kevin Ryde Date: Sun, 8 Nov 2009 21:48:43 +0000 (+0000) Subject: * emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Match noun X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~9584 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=af36a4a0eb15e34e0d08a85f6a6351c775f17fe3;p=emacs.git * emacs-lisp/checkdoc.el (checkdoc-proper-noun-regexp): Match noun at end of sentence (my Bug#4818). --- diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 6b226be0b28..7140c997283 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -331,12 +331,15 @@ This should be set in an Emacs Lisp file's local variables." "List of words (not capitalized) which should be capitalized.") (defvar checkdoc-proper-noun-regexp + ;; "[.!?]" is for noun at end of a sentence, since those chars + ;; are symbol syntax in emacs-lisp-mode and so don't match \\_>. + ;; The \" allows it to be the last sentence in a docstring too. (let ((expr "\\_<\\(") (l checkdoc-proper-noun-list)) (while l (setq expr (concat expr (car l) (if (cdr l) "\\|" "")) l (cdr l))) - (concat expr "\\)\\_>")) + (concat expr "\\)\\(\\_>\\|[.!?][ \t\n\"]\\)")) "Regular expression derived from `checkdoc-proper-noun-regexp'.") (defvar checkdoc-common-verbs-regexp nil